
<%@page import="com.fms.processor.ProfileProcessor"%>
<%@page import="java.util.List"%>
<%@page import="com.fms.bo.*"%>
<%@ page language="java" errorPage="/CustomError.jsp" pageEncoding="UTF-8"%>
<%request.getRequestDispatcher("/jsp/BaseInclude.jsp").include(request, response);%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

%>
<%
ProfileProcessor pProcessor = new ProfileProcessor();
String userId = session.getAttribute("userid").toString();
List<UserBO> list = pProcessor.getdata(userId);
 %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>Register</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script>
	
		function showTxtBox(){
		alert();
			
			document.getElementById('adminId').style.visibility='hidden';
			document.getElementById('adminID').style.visibility='hidden';
			
		}
		
		function dis(){
		alert("dis");
		document.getElementById('adminId').style.visibility='hidden';
		}
		
		window.onload = function dis(){
				alert("window");		
		}
	
	</script>

  </head>
  
  <body onload="javaScript:dis()">
  <html:html>
  <html:form action="/login" method="post" onsubmit="return submitForm()" > 
<div id="main">
<jsp:include page="Logo.jsp"></jsp:include><div id="top-blue-line"></div>
  </div>
 <div id="main">
 <div id="margin-top">
<div id="content"><div id="wid-228">
 <div id="myBox">
 <div class="pad-left" ><span class="blue-bold"><bean:message key="userProfile"/></span></div>
  <div class="pad-left"><span class="bold-11"><bean:message key="userName"/></span><br />
  	<% if(list.size() > 0){
  	      String userNme = list.get(0).getUserName();         %>
      <html:text property="userName" alt="Enter UserName" value="<%=userNme %>"  styleClass="field-login" maxlength="25" disabled="true"/>
      
  </div>
  <div class="pad-left"><span class="bold-11"><bean:message key="userid"/></span><br />
  
  	    <% String loginId = list.get(0).getUserId(); %>
      <html:text property="loginid" value = "<%=loginId %>" alt="Enter LoginID" styleClass="field-login" maxlength="25" disabled="true"/>
  
  </div>
      
	  <div class="pad-left"><span class="bold-11"><bean:message key="emailid"/></span><br />
	  	<% String emailId = list.get(0).getEmailId();%>
	  	<input type = "text"  value = "<%=emailId %>" name = "emailId" disabled="true" />
	  </div>
	  	
	  <div class="pad-left"><span class="bold-11"><bean:message key="isAdmin"/></span><br/>
	  <% String isAdmin = list.get(0).getUserType();
	    if(isAdmin.equalsIgnoreCase("A")) {%>
	    <input name="Input" checked="true" id="Input" type="checkbox" onclick="showTxtBox()" disabled="true"/>
	  </div>	
	  
	  
	  
	  <div class="pad-left"><span class="bold-11"><bean:message key="adminID"/></span><br/>
	  	<input type = "text" name = "adminId" value = ""  disabled="true"/><br><br>
	  </div>  
	  <%} %>
	  
	       <%} %>
	  
	   
</div>
 
</div>
<div class="welcome">&nbsp;USER PROFILE<br />
    <br /><br />
    <img src="<%=path%>/images/userprofile3.jpg" width="383" height="285" /><br />
    	<br />
  </div>  
</div>
</div>
</div>
  </html:form>
  	
  </html:html>
    
  </body>
</html>
